﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAO
{
    public class EmployerAccountDAO
    {
        public static void CreateEmployerAccount(string username, string password, string fullname, string position, string email,
            string address, string city, string phone, string mobile, string companyName, string companyLink, string companyDescription)
        {
            FindJobDBDataContext db = new FindJobDBDataContext();

            EMPLOYERACCOUNT a = new EMPLOYERACCOUNT();
            a.Username = username;
            a.Pass = password;
            a.FullName = fullname;
            a.Position = position;
            a.Email = email;
            a.Addr = address;
            a.City = city;
            a.Phone = phone;
            a.Mobile = mobile;
            a.CompanyName = companyName;
            a.CompanyDescription = companyDescription;
            a.Link = companyLink;

            db.EMPLOYERACCOUNTs.InsertOnSubmit(a);
            db.SubmitChanges();
        }
    }
}
